<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        div{
            width:150px;
            height:150px;
            background-color: pink;
            display: inline-block;
        }
        div:nth-of-type(1){
            position:relative;
            left:50px;
            background-color:red;
        }
    </style>
</head>
<body>
<div></div>
<div></div>
<script>

</script>
</body>
</html>